<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<title>Running Tests</title>
	</head>
	<body>
		<h1>Running Tests</h1>
		<p>
		This requires that the model contains a system specification, but this system specification is not used and hence does not need to define any instances or channels.
		It only makes sense for models with <a href="../language/SyntaxTests.html">test primitives</a>.
		Alternatively, models can also be <a href="../simulating_models/run.html">run as POOSL Simulation</a>. 
		</p>
		
		<h2>Launch</h2>
		<p>
		Follow one of these steps:
		<ul>
			<li>Right click in an open editor, or on a .poosl file in the Project Explorer. Select "Run As" -> "POOSL Tests".</li>
			<img src="img/right_click_test.png"/>
			<li>If the POOSL Model is opened in the editor, click on the small arrow next to the Run button and select "Run as..." -> "POOSL Tests".</li>
			<li>Click on the small arrow next to the Run button, and select the POOSL Model (if present).</li>
			<img src="img/run_previous_test.png"/>
			<li>Click on the Run button, or use keyboard shortcut &lt;CTRL&gt;-&lt;F11>, to run the most recently launched simulation.</li> 
		</ul>
		The launch configuration will be automatically created. You can change the launch settings in the <a href="launch_configuration.html#change_settings">launch configuration</a>.
		</p>

		<h2>Monitor</h2>
		<p>
		The result of the tests wil be shown in the Console view at the bottom of the screen. 
		At the end of the tests the console output gives the results of the tests, for example:		
		</p>
		
		<p>
		======================================</br>
		Testsuite summary</br>
		======================================</br>
		# TOTAL: 4</br>
		# PASS:  2</br>
		# FAIL:  1</br>
		# SKIP:  1</br>
		======================================</br>
		* someTestClass::someDataMethod</br>
		   Failed with: Error: 'ASSERT: Test will fail'</br>
		   Location: (C:\...\org.eclipse.poosl.examples\models-basic\HelloWorld\hello_world.poosl:47:10-C:\...\org.eclipse.poosl.examples\models-basic\HelloWorld\hello_world.poosl:47:47)</br>
		======================================</br>
		Some unit tests failed.</br>
		</p>
		
		<h2>Stop</h2>
		<p>
		To stop a running simulation, click on the red stop button (red square icon) in the Console view at the bottom of the screen.
		</p>
		
		<h2>Advanced features</h2>
		<p>
		<ul>
			<li><a href="http://www.es.ele.tue.nl/poosl/Tools/poosl_ide_unittest/ ">Experimental POOSL Unit Testing Plug-in</a>
			<li><a href="launch_configuration.html#setting_seed">Setting a seed for resolving non-determinism</a>
			<li><a href="../export_functionality/export.html#rotalumis">Run simulator from the command-line</a>			
		</ul>
		</p>
	</body>
</html>